let modal = document.getElementsByClassName('modal')[0];
let layer = document.querySelector('.layer');
document.getElementById('btn').onclick = function (event) {
  event = event || window.event;
  layer.className = 'layer active';
  modal.className = 'modal display';
}
modal.querySelector('.close').onclick = function (event) {
  event = event || window.event;
  layer.className = 'layer disappear';
  modal.className = 'modal';
}